<template>
  <div class="search-work">
    <div class="search-work-box">
      <!-- 头部组件 -->
      <div class="search-info">
        <form action="" class="search-form">
          <input type="select" class="select" />
          <span class="font"></span>
          <span class="three-Navigation" @click="positionInfo">职位类型</span>
          <div class="three-ber" v-show="isShow" @mouseleave="showFalse">
            <dl>
              <dt>不限</dt>
              <dd>
                技术<span>></span>
                <ul class="two-bar">
                  <li>
                    后端开发
                    <ul>
                      <li>c++</li>
                      <li>产品总监</li>
                      <li>c++</li>
                      <li>客户经理</li>
                    </ul>
                  </li>
                  <li>
                    后端开发
                    <ul>
                      <li>c++</li>
                      <li>产品总监</li>
                      <li>c++</li>
                      <li>客户经理</li>
                    </ul>
                  </li>
                  <li>
                    后端开发
                    <ul>
                      <li>c++</li>
                      <li>产品总监</li>
                      <li>c++</li>
                      <li>客户经理</li>
                    </ul>
                  </li>
                  <li>
                    后端开发
                    <ul>
                      <li>c++</li>
                      <li>产品总监</li>
                      <li>c++</li>
                      <li>客户经理</li>
                    </ul>
                  </li>
                </ul>
                <li>前端开发</li>
                <li>大数据</li>
                <li>全栈工程师</li>
              </dd>
              <dd>技术<span>></span></dd>
              <dd>服务<span>></span></dd>
              <dd>经验<span>></span></dd>
            </dl>
          </div>
          <!-- autofocus自动对焦 -->
          <input type="text" placeholder="搜索职位、公司" autofocus />
          <button>搜索</button>
        </form>

        <div class="ipt-phone">
          <input type="text" placeholder="输入手机号" />
          <input type="text" placeholder="验证码" />
          <span>获取</span>
          <button>登陆/注册</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HeaderLogin",
  data(){
    return{
      isShow:false
    }
  },
  methods:{
    positionInfo(){
      this.isShow = true
    },
    showFalse(){
      this.isShow = true
    }
  }
};
</script>

<style lang="less" scoped>
ul,li{
  list-style: none;
}

.search-work {
  width: 100%;
  &-box {
    margin: 0 auto;
    background: #fff;
    .search-info {
      padding: 20px;
      display: flex;
      margin: 0 auto;
      width: 1200px;
      // border: 1px solid red;
      .search-form {
        width: 750px;
        background: #00bebd;
        border-radius: 10px;
        position: relative;
        .font {
          position: absolute;
          border-left: 6px solid transparent;
          border-right: 6px solid transparent;
          border-top: 6px solid #00bebd;
          border-radius: 3px;
          left: 110px;
          top: 24px;
          cursor: pointer;
        }
        input {
          height: 50px;
          border: none;
          font-size: 16px;
          width: 500px;
          border: #00d7c6 2px solid;
          border-right: none;
          border-left: none;
          outline: none;
          &:nth-child(1) {
            border-radius: 10px 0 0 10px;
            margin: 2px 0 2px 2px;
          }
          &:nth-child(2) {
            border-radius: 0 10px 10px 0;
          }
        }
        .select {
          width: 150px;
        }
        .select:hover .font {
          border-top: 6px solid #00d7c6;
        }
        .three-Navigation {
          position: absolute;
          left: 20px;
          top: 17px;
          color: #222;
          font-size: 16px;
          transition: all linear 0.2s;
          cursor: pointer;
          &:hover {
            color: #00d7c6;
          }
        }

        .three-ber {
          padding: 4px 0px 4px 8px;
          max-height: 286px;
          height: 286px;
          width: 145px;
          border-right: 1px solid #ededed;
          background: #fff;
          position: absolute;
          border-radius: 8px;
          z-index: 10;
          dl{
            position: relative;
            dt{
              line-height: 36px;
              color: #333;
              font-size: 14px;
              transition: all 0.2s linear;
              padding: 0 16px 0 8px;
              border-radius: 4px;
            }
            dd{
              line-height: 36px;
              color: #333;
              font-size: 14px;
              transition: all 0.2s linear;
              padding: 0 16px 0 8px;
              border-radius: 4px;
              margin: 0;
              &:hover ul{
                display: block;
              }
              span{
                float: right;
              }
              .two-bar{
                width: 145px;
                position: absolute;
                left: 145px;
                background: #fff;
                top: 0;
                right: -3px;
                display: none;
                border: 1px solid rgb(216,216,216);
                li{
                  &:hover a{
                    display: block;
                  }
                  ul{
                    position: absolute;
                    left: 145px;
                    top:0;
                    width: 145px;
                    li{
                      a{
                        background: #fff;
                        border: 1px solid rgb(216,216,216);
                        padding: 0 16px 0 8px;
                        line-height: 36px;
                        color: #333;
                        font-size: 14px;
                        display: none;
                      }
                    }
                  }
                }
              }
            }
          }
        }

        button{
          width: 70px;
          font-size: 20px;
          background: #00bebd;
          border: none;
          color: #fff;
          height: 52px;
          margin-left: 9px;
          margin-top: 3px;
          cursor: pointer;
          vertical-align: top;
          padding: 0;
        }
      }

      .ipt-phone{
        float: right;
        margin-top: 5px;
        margin-left: 30px;
        position: relative;
        span{
          position: absolute;
          left: 260px;
          top:14.5px;
          color: #00bebd;
          cursor: pointer;
          font-size: 12px;
        }
        input:nth-of-type(1){
          width: 130px;
          padding: 11px 14px;
          border-radius: 8px;
          border: 1px solid #e6e6e6;
          transition: all 0.2s linear;
          outline: none;
          &:hover{
            border: 1px solid #00d7c6;
          }
        }
        input:nth-of-type(2){
          width: 100px;
          padding: 11px 14px;
          border-radius: 8px;
          border: 1px solid #e6e6e6;
          transition: all 0.2s linear;
          margin: 0 15px;
          outline: none;
          &:hover{
            border: 1px solid #00d7c6;
          }
        }
        button{
          top: 27px;
          width: 80px;
          cursor: pointer;
          line-height: 42px;
          font-size: 12px;
          color: #00d7c6;
          background-color: #fff;
          border: 1px solid #00bebd;
          border-radius: 8px;
          transition: all 0.2s linear;
          &:hover{
            background: rgb(0,190,189,0.1);
          }
        }
      }
    }
  }
}
</style>
